<!DOCTYPE html>
<html>
  <head>
    <title>主页</title>
	<meta charset="utf-8">
    <link href="/stylesheets/bootstrap.min.css" rel="stylesheet" media="screen">
      <script src="../javascripts/jquery-1.12.2.min.js"></script>
      <script src="/javascripts/bootstrap.min.js" type="text/javascript"></script>
      <% include ../includes/head%>
		<style type="text/css">
			.panel-title{
				font-size: 24px;
				font-weight: bold;
			}
            .spys{
                list-style-type: none;
            }
            .spys li{
                float: left;
                margin: 10px 10px;
                width: 180px;
                height: 230px;
            }
            .spys li div strong{
                color: red;
            }

		</style>
  </head>
<body>
<% include ../includes/header%>
    <div id="container-inner">
        <ul id="breadcrumb-wrapper">
        
            <li>
                <a href="index.html">
                <ins>
                    <div class="br-left"></div>
                    <div class="br-mid">
                        主页
                    </div><!--br-mid-->
                    <div class="br-right">
                    </div><!--br-right-->
                </ins>    
                </a>
            </li>  
            
            <li>
                <a class="active" href="contact.html">
                <ins>
                    <div class="br-left"></div>
                    <div class="br-mid">
                        商品页
                    </div><!--br-mid-->
                    <div class="br-right">
                    </div><!--br-right-->
                </ins>    
                </a>
            </li>
            <li id="page-title">
                <a class="btn btn-xs btn-success" href="cart" style="margin-right: 35px; line-height: 20px; color:#fff;margin:-5px 20px 10px">购物车</a>
            </li><!--page-title-->
        </ul><!--breadcrumb-wrapper-->
        <div id="inner-border"></div>
        <div class="clear"></div>
            
        <div id="contentwrap-inner">    
            
            <div class="row">
                        
                            <%for(var i in Commoditys){ if(!Commoditys[i].name)continue;%>
                                <div class="col-md-3">
                                    <div class="thumbnail">
                                        <a href="/commodity/<%= Commoditys[i]._id%>">

                                            <%if(Commoditys[i].imgSrc.indexOf('http:') > -1){%>

                                            <img src="<%= Commoditys[i].imgSrc %>" width="192" height="135" alt="Commoditys[i].name">

                                            <%}else{%>

                                            <img   src="/upload/<%= Commoditys[i].imgSrc %>" style="width: 192px;height: 135px">
                                            
                                            <%}%>

                                        </a>
                                        <div class="caption">
                                            <span style="display:block;font-size: 20px; margin-right: 16px"><%=Commoditys[i].name%></span>
                                            <span style="display: block;color:#f40;font-size: 16px">￥<%=Commoditys[i].price%>.00</span>
                                            <p>
                                                <a class="btn btn-danger" style="width: 120px;"  href="/addToCart/<%=Commoditys[i]._id%>">加入购物车</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            <%}%>
                        
                    </div>
        </div><!--container-inner-->
    </div>

<% include ../includes/footer%>
</body>
</html>

